// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

import GlobalData from './GlobalData'

@ccclass
export default class NewClass extends cc.Component {

    

    onLoad () {
        this.updateData();
    }

    start () {

    }

    updateData(){
        const rop = cc.find('Canvas/shop/roplabel').getComponent(cc.Label).string = `套绳: ${GlobalData.ropNum}`
        const money = cc.find('Canvas/shop/money').getComponent(cc.Label).string = `Money: ${GlobalData.money}`
    }

    // update (dt) {}

    onGoback(){
        cc.director.loadScene('main')
    }
}
